package com.lz.zk;

import javax.servlet.http.HttpServletResponse;

/**
 * 应用程序业务模块执行中出现错误
 * 比如调用方法失败。该异常信息会以400错误码返回给客户端/浏览器
*/
public class MyErrorException extends RuntimeException {
	private int httpStatusCode = HttpServletResponse.SC_BAD_REQUEST;
	
	public MyErrorException(String message) {
		super(message);
	}
	
	public MyErrorException(int statusCode, String message) {
		super(message);
		httpStatusCode = statusCode;
	}

	/**
	 * 获取 httpStatusCode
	 * @return 返回 httpStatusCode
	 */
	public int getHttpStatusCode() {
		return httpStatusCode;
	}
	

}
